package com.elong.qadev.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
 * 
 * @author kangchen
 *
 */
@Entity
@Table(name = "MENUITEM", schema = "ti")
public class MenuItem {
	public int id;
	public int menuId;
	public String menuName;
	public int parentId; 
	public String menuPath;
	public Date createDate;
	public String author;
	public String remarks;
	@Override
	public String toString() {
		return "MenuItem [id=" + id + ", menuId=" + menuId + ", menuName="
				+ menuName + ", parentId=" + parentId + ", menuPath="
				+ menuPath + ", createDate=" + createDate + ", author="
				+ author + ", remarks=" + remarks + "]";
	}

	public MenuItem(int id, int menuId, String menuName, int parentId,
			String menuPath, Date createDate, String author, String remarks) {
		super();
		this.id = id;
		this.menuId = menuId;
		this.menuName = menuName;
		this.parentId = parentId;
		this.menuPath = menuPath;
		this.createDate = createDate;
		this.author = author;
		this.remarks = remarks;
	}
	@Column(name = "MENUNAME", unique = true, nullable = false, length = 30)
	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}
	public MenuItem() {
	}
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name = "MENUID", unique = true, nullable = false, length = 20)
	public int getMenuId() {
		return menuId;
	}
	public void setMenuId(int menuId) {
		this.menuId = menuId;
	}
	@Column(name = "PARENTID", nullable = false, length = 20)
	public int getParentId() {
		return parentId;
	}
	public void setParentId(int parentId) {
		this.parentId = parentId;
	}
	@Column(name = "MENUPATH", nullable = false, length = 100)
	public String getMenuPath() {
		return menuPath;
	}
	public void setMenuPath(String menuPath) {
		this.menuPath = menuPath;
	}
	@Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATEDATE", length = 7)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	@Column(name = "AUTHOR", length = 10)
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	@Column(name = "REMARKS", length = 100)
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	
}
